using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using ThridGroup.ERP.Application.Contracts.DTO.WarehouseManagement;

namespace ThridGroup.ERP.WarehouseManagement
{
    /// <summary>
    /// 库区设置服务接口
    /// </summary>
    public interface IWarehouseAreaSettingService
    {
        /// <summary>
        /// 获取所有库区设置
        /// </summary>
        /// <returns>库区设置列表</returns>
        Task<List<WarehouseAreaSettingDto>> GetAllAsync();

        /// <summary>
        /// 获取指定仓库的库区设置列表
        /// </summary>
        /// <param name="warehouseId">仓库ID</param>
        /// <returns>库区设置列表</returns>
        Task<List<WarehouseAreaSettingDto>> GetByWarehouseIdAsync(int warehouseId);

        /// <summary>
        /// 根据条件分页查询库区设置
        /// </summary>
        /// <param name="input">查询条件</param>
        /// <returns>分页结果</returns>
        Task<PagedResultDto<WarehouseAreaSettingDto>> GetListAsync(GetWarehouseAreaSettingListInput input);

        /// <summary>
        /// 根据ID获取库区设置
        /// </summary>
        /// <param name="id">库区设置ID</param>
        /// <returns>库区设置DTO</returns>
        Task<WarehouseAreaSettingDto> GetByIdAsync(int id);

        /// <summary>
        /// 创建库区设置
        /// </summary>
        /// <param name="input">创建库区设置DTO</param>
        /// <returns>创建的库区设置ID</returns>
        Task<int> CreateAsync(CreateUpdateWarehouseAreaSettingDto input);

        /// <summary>
        /// 更新库区设置
        /// </summary>
        /// <param name="id">库区设置ID</param>
        /// <param name="input">更新库区设置DTO</param>
        /// <returns>是否更新成功</returns>
        Task<bool> UpdateAsync(int id, CreateUpdateWarehouseAreaSettingDto input);

        /// <summary>
        /// 删除库区设置
        /// </summary>
        /// <param name="id">库区设置ID</param>
        /// <returns>是否删除成功</returns>
        Task<bool> DeleteAsync(int id);

        /// <summary>
        /// 检查库区编码是否已存在
        /// </summary>
        /// <param name="code">库区编码</param>
        /// <param name="excludeId">排除的ID</param>
        /// <returns>是否存在</returns>
        Task<bool> IsCodeExistAsync(string code, int excludeId = 0);
    }
} 